{% extends 'base.html' %}

{% block content %}
  <div class="page-header">
    <h1>
      {{title}}
      <small>
        Some extra goodies from GAE
      </small>
      {% include 'bit/view_in_json_btn.html' %}
    </h1>
  </div>
  <div class="row">
    <div class="span6">
      <table class="table table-bordered">
        <tbody>
          {% for extra in extra_info %}
            <tr>
              <th class="span2">{{extra.replace('_', ' ').title()}}</th>
              <td>{{extra_info[extra] or '-'}}</td>
            </tr>
          {% endfor %}
        </tbody>
      </table>
    </div>
    <div class="span6">
      {% set map_lat_long = '55.693403,12.583046' %}
      {% if extra_info['city_lat_long'] %}
        {% set map_lat_long = extra_info['city_lat_long'] %}
      {% endif %}
      <div class="thumbnail">
        <a href="http://maps.google.com/maps?q={{map_lat_long}}" target="_blank">
          <img src="https://maps.googleapis.com/maps/api/staticmap?center={{map_lat_long}}&zoom=12&size=460x328&sensor=false"
                alt="Map of the location">
        </a>
      </div>
    </div>
  </div>
{% endblock %}
